// 引入样式
import './Tabbar.css'

import React, { Component } from 'react';
import sy from '../首页.svg'
import fl from '../分类.svg'
import qb from '../全部.svg'
import gwc from '../购物车.svg'
import grzx from '../个人中心.svg'
class Tabbar extends Component {
    constructor(props){
        super(props);
        this.state={
            arr:[
                {name:"首页", pic:sy},
                {name:"分类", pic:fl},
                {name:"全部商品", pic:qb},
                {name:"购物车", pic:gwc},
                {name:"个人中心", pic:grzx}
                 ]
        }
    }
    render() {
        return (
            <div className='lunbo'>
                {
                    // 列表渲染渲染
                    this.state.arr.map((item,index)=>{
                        return (
                            <div className='cate' key={index}>
                                <img src={item.pic} alt="" />
                                <div>{item.name}</div>
                            </div>
                        )
                    })
                }
            </div>
        );
    }
}

export default Tabbar;